#!/bin/bash

# 激活虚拟环境
source venv/bin/activate

# 检查是否需要安装依赖
if [ ! -f "requirements_installed" ]; then
    echo "Installing dependencies..."
    pip install -r requirements.txt
    touch requirements_installed
fi

# 启动服务器
echo "Starting FastAPI server..."
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000 